home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / rothrend.h < prev    next >
Text File  |  1995-08-11  |  9KB  |  256 lines

  1. #ifndef ROTHREND_H_INCLUDE
  2. /*
  3.  …ÕÕÕÕÕÕÕÕÕÕÕÕª
  4.  ∫ AUTOHEADER ∫
  5.  ÃÕÕÕÕÕÕÕÕÕÕÕÕ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
  6.  ∫ Filename     ROTHREND.H       ∫
  7.  «ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ∂
  8.  ∫ Creation     12/8/1995        ∫
  9.  ÃÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕπ
  10.  ∫                               ∫
  11.  ∫ Updated: Sat 12/8/1995 03:34  ∫
  12.  ∫                               ∫
  13.  ∫ Version: 1.025                ∫
  14.  ∫                               ∫
  15.  »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
  16. */
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. #pragma PACK(1) ;
  23.  
  24.  
  25.  
  26. typedef struct    DrawMap_Table {
  27.   signed long            center_x; // Player X << 16    (as in view pos struc)
  28.   signed long            center_y; // Player Y << 16    (as in view pos struc)
  29.   signed long            rot;         // Player rotation    (as in view pos struc)
  30.   unsigned short        size_x;     // pixels across
  31.   unsigned short        size_y;     // pixels down
  32.  
  33.   unsigned short        scale;     // 4096 = 1:1   4096/2 =1/2 size
  34.                 char        ratio_x;    // ratio of screen use GetScreenRatio(char *rationx, char*rationY)
  35.              char        ratio_y;    // ratio of screen
  36.  
  37.   unsigned char      edge;         // colour for edge of map (BOLD)
  38.   unsigned char      faint;     // colour used for steps etc.
  39.   unsigned char      doors;     // doors are in this colour
  40.   unsigned char      player;     // colour of player
  41. } DrawMap_Table;
  42.  
  43. typedef struct    RGB256_Pen {
  44.   unsigned char      red;    // values 0-255
  45.   unsigned char      green;
  46.   unsigned char      blue;
  47. } RGB256_Pen;
  48.  
  49. typedef struct    _LookSee { // Used by LookXY()                      / valid for types
  50.   unsigned char      Filler;        //
  51.   unsigned char      Type;            // see below                      /
  52.   unsigned short int Image;        // image number or colour      / 1-,2-,3-,4+
  53.   unsigned short int ImageX;        // xpos in image                  / 1,2,3,4*
  54.   unsigned short int ImageY;        // ypos in image                  / 1,2,3,4*
  55.   unsigned short int WallOffset;    // use _ROOM_AddressBase      / 3
  56.   unsigned short int SegOffset;    // use _ROOM_AddressBase      / 1,2,3,4
  57.   unsigned short int Flags;        // see below                      / 1,2,3,4
  58.   unsigned short int ObjOffset;    // use _OBJ_AddressBase          / 4
  59.   unsigned short int WallID;        //    ID if wall selected          / 3
  60.   unsigned short int SegID;        //    valid if not sky              / 1,2,3,4
  61.   unsigned short int ObjImage;    // image number of Object      / 4
  62.   unsigned char      ObjDir;        // direction of object          / 4
  63.   unsigned char      ObjFlags;     // object flags see below      / 4
  64.   unsigned char        FaceInfo;        // Top Middle or bottom see below
  65.   unsigned char      Filler00;        // even up to word size
  66.   unsigned short int Filler01;        // even up to word size
  67. } _LookSee;
  68.  
  69. typedef struct    _DoorStruct { // Used by LookXY()                      / valid for types
  70.   unsigned short int Seg_Offset;    //    door segment
  71.   unsigned char      Flags;        //
  72.   signed   char      Dir;           // rotation
  73.   unsigned long int  Function;    // function address
  74.   unsigned short int Timer;        // none manual door time
  75.   signed   short int HVtxX;       // X pos of hindge
  76.   signed   short int HVtxY;        // Y pos
  77.   unsigned short int Bleed_Seg;    // segment door bleeds into
  78.   unsigned short int View_Seg;    // segment towards player
  79.   unsigned long int  Poly;           //    Poly struct
  80.   unsigned long int  Verts;        //    Vertices struct
  81.   unsigned short int pad;
  82.   unsigned short int ManyVerts;
  83. } _DoorStruct;
  84.  
  85. // flags for _LookSee-->FaceInfo
  86. #define face_middle 0
  87. #define face_top       1
  88. #define face_bottom 2
  89.  
  90. // - If image is an Janim etc.. then will = then anim frame image. 
  91. //      if Mono then image = colour    
  92. //
  93. //
  94. // + Image of object +512, if ObjFlags = 3dobject then
  95. //                                    image = image of the face
  96. //                                    also, objects may show current anim frame
  97. //                                    Use ObjImage for better result, as this is the
  98. //                                    object number in rothed.
  99. //
  100. //    * If image is a 3dobject then will = X,Y of a single face.
  101. //
  102.  
  103. // Type
  104. #define LST_Nill        0                // image not found...
  105. #define LST_Roof        1                 // image is a segment roof
  106. #define LST_Floor        2                // image is a segment floor
  107. #define LST_Wall        3                // image is a wall part
  108. #define LST_Object    4                // image is an object
  109. #define LST_Sky        5                // image is the sky
  110.  
  111. // Flags    (use bit test not compare)
  112. #define LSF_NotMono        8        // Image Num = colour
  113.  
  114. // ObjFlags    (use bit test not compare)
  115. #define LSOF_3DObj        1        // Image is a 3dObject
  116.  
  117.  
  118. typedef struct    _ROOM_Block {             // offset in ROOM_AddressBase_
  119.   unsigned short int FileSize;     // block size
  120.   unsigned short int OffsetVert;// Vertex list
  121.   unsigned short int OffsetSeg; // Segments (_SEG_Block)
  122.   unsigned short int OffsetWall;// Walls
  123.   unsigned short int OffsetFace;// Faces
  124.   unsigned short int OffsetInfo;// Info
  125.   unsigned short int OffsetLink;// Link (Map warp info)
  126. } _ROOM_Block;
  127.  
  128. typedef struct    _OBJ_Block {             // offset in _OBJ_AddressBase_
  129.   signed   short int X;    //left right
  130.   signed   short int Y; //near far
  131.   unsigned char        ImageNo;
  132.   unsigned char        Dir;
  133.   unsigned char        Flags;
  134.   unsigned char        ID;
  135.   signed   short int Z; //up down
  136.   unsigned short int ExtSeg;// Segment offset unknown
  137. } _OBJ_Block;
  138.  
  139. // see Snd_Item in sounds.h for sound structs // offset in _SND_AddressBase_
  140.  
  141. // many segs = (_ROOM_Block.OffsetSeg)-2
  142. typedef struct    _SEG_Block {       // offset in ROOM_AddressBase_
  143.     signed short int RoofHight;  //
  144.     signed short int FloorHight; //
  145.   unsigned short int Internal;   //    Internal work space
  146.   unsigned char      RoofGfx;       //    \ gfx stuff
  147.   unsigned char      FloorGfx;   //    /
  148.   unsigned char      Flags;      //    see below
  149.   unsigned char      Glow;       //
  150.   unsigned char      SuperLink;  //    Map number or Transparence drop
  151.   unsigned char      Sides;      // number of walls
  152.   unsigned short int WallOffset; //    offset (_WALL_Block)
  153.   unsigned short int XYDispRoof; //    byte each for x and y
  154.   unsigned short int XYDispFloor;//    ""      ""
  155.   unsigned short int ID;            //
  156. } _SEG_Block;
  157.  
  158. // Flags 
  159. #define    SGF_SuperLinked    0x01    // map warp...
  160. #define    SGF_Candle            0x02    // candle lit segment
  161. #define    SGF_RoofScale        0x0c    // 0-3 roof scale
  162. #define    SGF_FloorScale        0x30    // 0-3 floor scale
  163.  
  164.  
  165.  
  166. // many walls = (_ROOM_Block.OffsetWall)-2
  167. typedef struct    _WALL_Block {       // offset in _ROOM_AddressBase
  168.   unsigned short int Vert1Offset;//    offset16 (_VERT_Block)
  169.   unsigned short int Vert2Offset;//    offset16 (_VERT_Block)
  170.   unsigned short int FaceOffset; //    offset16 (_FACE_Block)
  171.   unsigned short int TSeg;       //    offset16 (_SEG_Block) (Inside(link back to seg))
  172.   unsigned short int TSegBack;   //    offset16 (_SEG_Block) (behind wall)
  173.   unsigned char          Flags;   //    offset16 (_SEG_Block) (behind wall)
  174.   unsigned char         TriggerID;   //    offset16 (_SEG_Block) (behind wall)
  175. } _WALL_Block;
  176.  
  177. #define WBF_StopPlayer 0x01
  178.  
  179.  
  180.  
  181.  
  182. // many faces = (_ROOM_Block.OffsetFace)-2
  183. typedef struct    _FACE_Block {       // offset in _ROOM_AddressBase
  184.   unsigned short int XSize;        //    BIT 15 = extended struc
  185.   unsigned char      UpperGfx;    //    \
  186.   unsigned char      LowerGfx;    //    fi Gfx stuff
  187.   unsigned char      WallGfx;        //    /
  188.   unsigned char      Flags;        //    see below
  189.  
  190.   // extended struc only
  191.   unsigned char      XShift;        //    image shift info
  192.   unsigned char      YShift;        //
  193.   unsigned short int ID;             //
  194. } _FACE_Block;
  195.  
  196. // flags
  197. #define    FCF_Transparent        0x01    // 
  198. #define    FCF_XFlip                0x02    // 
  199. #define    FCF_ImageFit            0x04    // 
  200. #define    FCF_TranFlag            0x08    // mono colour
  201. #define    FCF_NoReflect            0x10    //
  202. #define    FCF_HalfSize            0x20    //
  203. #define    FCF_EdgeMap                0x40    //
  204. #define    FCF_YEdge                0x80    //
  205.  
  206. // notes for face struct... 
  207. // to save memory all duplicate FACE structs popint to the same address
  208. // so if you know you are going to edit it, give it a unique ID, that way
  209. // it cannot be packed.
  210.  
  211.  
  212.  
  213. // many verts = (_ROOM_Block.OffsetVert)-2
  214. typedef struct    _VERT_Block {       // offset in _ROOM_AddressBase
  215.     signed long  int X;                // \after rotation
  216.     signed long  int Z;                //    /
  217.     signed short int StartX;        //
  218.     signed short int StartZ;        //
  219. } _VERT_Block;
  220.  
  221.  
  222. typedef struct    _LINK_Block {      // offset in _LINK_AddressBase
  223.   unsigned short int FileSize;  // block size
  224.   unsigned short int OffsetVert;// Vertex list
  225.   unsigned short int ManyVert;  // many vertices
  226.   unsigned short int InitVert;  // Where i start
  227.   // this will get longer...
  228. } _LINK_Block;
  229.  
  230. #pragma aux UserBreak="int 3";
  231.  
  232.  
  233. typedef struct    _MOUSE {             // offset in ROOM_AddressBase_
  234.   unsigned  long int AddressPtrLo;        // Lores pointer \if same will dbl
  235.   unsigned  long int AddressPtrHi;        // Hires pointer /hires version
  236.   unsigned  long int HotSpotX;             // coods into pointer
  237.   unsigned  long int HotSpotY;            // "" ""
  238.   unsigned  long int Speed;                // mouse speed 32=normal 16=*2 64=/2
  239. } _MOUSE;
  240.  
  241.  
  242.  
  243.  
  244. #pragma PACK ;
  245.  
  246.  
  247.  
  248. #ifdef __cplusplus
  249. };
  250. #endif
  251.  
  252.  
  253. #define ROTHREND_H_INCLUDE
  254. #endif
  255.  
  256.